package chapter8;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class SortTest {
    public static void main(String[] args) {
        List list = new ArrayList();
        list.add(2);
        list.add(-5);
        list.add(3);
        list.add(0);
        System.out.println(list);
        Collections.reverse(list);
        System.out.println("反转后的list：" + list);
        Collections.sort(list);
        System.out.println("排序后的list：" + list);
        Collections.shuffle(list);
        System.out.println("乱序后的list：" + list);
    }
}
